<?php

namespace App\Library\Common;

class Singleton
{
    protected static array $instanceMap = [];

    public static function getInstance()
    {
        if (!isset(self::$instanceMap[static::class])) {
            self::$instanceMap[static::class] = new static();
        }
        return self::$instanceMap[static::class];
    }

    private function __construct() { }

}
